Quickstart: Discrete Dynamic with the command line interface
-------------------------------------------------------------

**NeurEcoRNN** is the executable used for building, evaluating and exporting **Discrete Dynamic** models. The executable can be called directly from a terminal / powershell only after a full installation (the portable version does not offer this option).

To build a NeurEco Discrete Dynamic model, run the following command in the terminal:

.. code-block:: shell

    neurecoRNN build path/to/build/configuration/file/build.conf

The skeleton of a configuration file required to build NeurEco Discrete Dynamic model, here build.conf, looks as follows (for the test case :std:ref:`Temperature forecasting in quickstart`).
Its fields should be filled according to the problem at hand.

.. code-block:: javascript

	{"neurecoRNN_build":
	        {
	            "exc_filenames": ["./x_first_year.npy"],
	            "output_filenames": ["./y_first_year.npy"],
	            "validation_exc_filenames": [],
	            "validation_output_filenames": [],
	            "test_exc_filenames": [],
	            "test_output_filenames": [],
	            "write_model_to": "./TemperatureForecasting.ernn",
	            "write_model_output_to_directory": "",
	            "checkpoint_address": "./TemperatureForecasting.checkpoint",
	            "resume": false,
	            "settings": {
	                "valid_percentage": 30,
	                "min_hidden_state": 1,
	                "max_hidden_state": 0,
	                "steady_state_exc": [],
	                "steady_state_out": [],
	                "input_normalization": {
	                    "shift_type": "mean",
	                    "scale_type": "l2",
	                    "normalize_per_feature": true},
	                "output_normalization": {
	                    "shift_type": "mean",
	                    "scale_type": "l2",
	                    "normalize_per_feature": true}
	                    }
	        },
	}

.. note:: 
    For detailed documentation on **build**, see :std:ref:`Build NeurEco Discrete Dynamic model with the command line interface`. For data preparation, see :std:ref:`Data preparation for NeurEco Discrete Dynamic conf`.


To perform an evaluation, run the following command in the terminal:

.. code-block:: shell

    neurecoDNN evaluate path/to/evaluation/configuration/file/eval.conf
	
The skeleton of an evaluation configuration file, here eval.conf, looks as follows (for the test case :std:ref:`Temperature forecasting in quickstart`).
Its fields should be filled according to the problem at hand.

.. code-block:: javascript

   {
	    "neurecoRNN_evaluate": {
        "exc_filenames": ["./x_second_year.npy"],
        "init_output_filenames": [],
        "init_exc_filenames": [],
        "ernn_filename": "./TemperatureForecasting.ernn",
        "write_model_output_to_directory": "./EvaluationReults"
    }
	}

.. note::
    For detailed documentation on **evaluate**, see :std:ref:`Evaluate NeurEco Discrete Dynamic model with the command line interface`.

To export the model to FMU format, run:

.. code-block:: shell

	neurecoRNN exportFMU ./TemperatureForecasting.ernn ./TemperatureForecasting.fmu

Export to FMU format requires *embed* license.

.. note::
    For detailed documentation on Discrete Dynamic with the command line interface, see :std:ref:`Discrete Dynamic with a configuration file`.